<template>
    <custom-page-box>
        <div class="content">
            <div>
                <span>标题：</span>
                <div>{{ infoList.title }}</div>
            </div>
            <div>
                <span>接受范围：</span>
                <div v-if="Number(infoList.scope) === -1">全体</div>
                <div v-if="Number(infoList.scope) === 4">服务商</div>
                <div v-if="Number(infoList.scope) === 5">投资商</div>
                <div v-if="Number(infoList.scope) === 6">政府端</div>
            </div>
            <div>
                <span>类型：</span>
                <div>{{ infoList.category === 7 ? '通知' : '推送' }}</div>
            </div>
            <div>
                <span>内容：</span>
                <div>{{ infoList.message }}</div>
            </div>
            <div class="btn">
                <a-button
                    type="primary"
                    @click="
                        () => {
                            $router.go(-1)
                        }
                    "
                >
                    返回
                </a-button>
            </div>
        </div>
    </custom-page-box>
</template>

<script>
export default {
    data () {
        return {
            infoList: {}
        }
    },
    async mounted () {
        const res = await this.$ApiServer['operate/info/get']({
            id: this.$route.params.id
        })
        if (res.code === 200) {
            this.infoList = res.data
        }
    }
}
</script>

<style lang="less" scoped>

.content .btn{
  margin-top: 30px;
}
.head {
  width: 100%;
  background: #fff;
  margin-bottom: 0.1rem;
  height: 0.48rem;
  display: flex;
  align-items: center;
  padding: 0 0.3rem;
  justify-content: flex-end;
}
.content {
  width: 100%;
  height: 100%;
  background-color: #fff;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  & > div {
    display: flex;
    span {
      font-size: 14px;
      color: #999999;
    }
    div{
      font-size: 14px;
      color: #333333;
    }
    & + div {
      margin-top: 0.2rem;
    }
  }
}
</style>
